Huawei P8 Lite (huawei-alice)

From postmarketOS Wiki
Huawei P8 Lite
P8 Lite with XFCE4
P8 Lite with XFCE4
Manufacturer Huawei
Name P8 Lite
Codename huawei-alice
Released 2015
Type handset
Hardware
Chipset HiSilicon Kirin 620 (Hi6220)
CPU Octa-core 1.2 GHz Cortex-A53
GPU Mali-450 MP4
Display 720x1280 IPS LCD
Storage 16 GB
Memory 2 GB
Architecture aarch64
Software
Original software Android
Original version 5.0.2
Extended version 6.0
postmarketOS
Category testing
Pre-built images no
Mainline no
postmarketOS kernel 3.10.108
Unixbench Whet/Dhry score 2193.0
Features
Flashing
Partial
USB Networking
Works
Internal storage
SD card
Battery
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Audio
Camera
Camera Flash
Connectivity
WiFi
Works
Bluetooth
GPS
NFC
Modem
Calls
SMS
Mobile data
Miscellaneous
FDE
USB OTG
HDMI/DP
Sensors
Accelerometer
Magnetometer
Ambient Light
Proximity
Hall Effect
Haptics
Barometer


Users owning this device


How to enter flash mode

Fastboot - hold Power + Volume Down

Recovery - hold Power + Volume Up

Bootloader

The bootloader can be unlocked using PotatoNV. To unlock the bootloader, you will need to disassemble the device.

The back cover is attached with clips, and can be taken off with some fiddling. There's a bit of glue around the battery, but you can remove it by wedging in a plastic card. See the iFixit teardown guide for this device for more detailed instructions.

The test point for the device is located under the bottom metal shield and speaker. You will need to remove them to get to it - the shield (and the top speaker screws) are standard Philips-heads, the bottom ones are torque. See the photo at the bottom of the page. Short down the two points marked in red with a pair of tweezers to activate it.

Follow the guide in the PotatoNV README to unlock the bootloader. Select the Kirin 620 bootloader. Note that you need a Windows PC to run the PotatoNV software. Make sure you install the testpoint drivers.

It's also possible to unlock the bootloader without opening the device by following this bootloader unlock guide on XDA developers. Effectively, the process is just downgrading to Android 5 then rooting the device then getting the OEM unlock key that way. PotatoNV should work better, though.

Serial console

According to schematics, UART should be available on the test points:

P8 lite UART.png

The schematics also mention some JTAG pins, however they appear to be hidden behind the shielding, and are on the other side of the motherboard (not the one that's immediately accessible after taking off the back cover). TODO.

Console log from boot:

(baud rate: 115200)
debug EMMC boot: print init OK
debug EMMC boot: send RST_N .
debug EMMC boot: start eMMC boot......
OnChipRom: fastboot1 Verif sucess !
[BDID]boardid: 719 <7.1.9>
battery ocv is 3359 mv
(switches to baud rate: 921600)
Update debug uart baudRate to :921600

after EC!!get_hw_config_int,hw_afreq:1200000.

get_efuse_value,efuse ATE_flag temp:0x0af00000.

ATE PASS,ate flag value:0x00000001.

get_efuse_value,efuse acpu_freq change level:0xa279e700.

get_efuse_value,efuse afreq change level val:0x00000000.

get_efuse_value,efuse acpu_freq level:0xa279e700.

get_efuse_value,efuse acpu freq sys level:0x00000000.

###INFO###,soc_freq = hw_afreq, efuse_afreq:1200000,hw_afreq:1200000.

efuse ACPU 1.4G HPM:0.

efuse ACPU 1.2G HPM:0.

efuse ACPU 960M HPM:0.

fastboot: acpu_dvfs_init successful! 

begin get voltage by hpm...

hpm_code_fiting,prof_id:1,hpm:0x00000158,fiting_hpm:0x00000158,temp:16.

hpm_code_fiting,prof_id:2,hpm:0x00000171,fiting_hpm:0x00000171,temp:16.

vd_code_fiting,dir:0,prof_id:2,delta:287.

vd_code_fiting,dir:1,prof_id:2,delta:217.

prof[729000]: hpm_dly_exp = 0x00000bad, hpm_dly_exit = 0x00000bf3!

hpm_code_fiting,prof_id:3,hpm:0x000001af,fiting_hpm:0x000001b0,temp:16.

vd_code_fiting,dir:0,prof_id:3,delta:294.

vd_code_fiting,dir:1,prof_id:3,delta:224.

prof[960000]: hpm_dly_exp = 0x00000c78, hpm_dly_exit = 0x00000cbe!

hpm_code_fiting,prof_id:4,hpm:0x000001ea,fiting_hpm:0x000001ec,temp:16.

vd_code_fiting,dir:0,prof_id:4,delta:303.

vd_code_fiting,dir:1,prof_id:4,delta:233.

prof[1200000]: hpm_dly_exp = 0x00000e68, hpm_dly_exit = 0x00000eae!

acpu support freq num:5 

volt:0x00000049 0x00000049 0x00000049 0x0000004f 0x0000005e 

#### success !!!!! set_acpu_freq: acpu support freq num is 5 and start is  4 .

get_ddr_type 1; (lpddr2: 0; lpddr3: 1)

pass the func addr: [0xfff81b10]: 0xf980d674ddr_init(): get_ddr_type: 1

  ddr freq: 800000

in lpddr3_init: mode: 0; freq_config: 800

switch ddr voltage: 1.25V -> 1.2V

lpddr3_init 150

lpddr3_150_rank0_init_pass

lpddr3_150_rank1_init_pass

lpddr3_init 266

lpddr3_266_rank0_init_pass

lpddr3_266_rank1_init_pass

lpddr3_init 400

lpddr3_400_rank0_init_pass

lpddr3_400_rank1_init_pass

switch ddr voltage: 1.2V -> 1.25V

lpddr3_init 533

lpddr3_rank0_phydraminit_pass

lpddr3_cat_pass

lpddr3_533_rank0_init_pass

rdet_lbs_passrdet_ds_passrdet_rbs_av_passwdet_lbs_passwdet_ds_passwdet_rbs_av_passlpddr3_533_rank1_init_pass

lpddr3_init 800

lpddr3_rank0_phydraminit_pass

lpddr3_cat_pass

lpddr3_800_rank0_init_pass

rdet_lbs_passrdet_ds_passrdet_rbs_av_passwdet_lbs_passwdet_ds_passwdet_rbs_av_passlpddr3_800_rank1_init_pass

ERROR: tmp_freq: 0

tmp_freq: 400000

MR8 value=:0x0000005b

MR5 value=:0x00000001

Samsung DDR

MR6 value=:0x00000004

MR5 value=:0x00000000

[MR7,MR6,MR5]=:0x00000401

ddr init pll1 0x00007800!ddrc_qos_init done

bootloader_logger got buffer at 0x07300000, size 0x00040000

bootloader_logger: no valid data in buffer , (sig = 0x43474244)



[emmc_set_card_ready]emmc id:0xdafc13cd 0x4206f7e6 0x3331314d 0x15010052



[emmc_set_card_ready]manufid: 0x00000015

DDR mode emmc

--error: gps/ldo16

[SEC]check_oem_hw: carrier_id = 0x00000000

[SEC]copy_vrl_to_newaddr: old 16 and new 28 vrl is the same!0

[SEC]copy_vrl_to_newaddr: old 17 and new 6 vrl is the same, skip!!1

[SEC]copy_vrl_to_newaddr: old 19 and new 22 vrl is the same, skip!!1

[SEC]copy_vrl_to_newaddr: old 14 and new 24 vrl is the same, skip!!1

[SEC]copy_vrl_to_newaddr: old 13 and new 27 vrl is the same, skip!!1

[SEC]copy_vrl_to_newaddr: old 9 and new 4 vrl is the same, skip!!1

[SEC]copy_vrl_to_newaddr: old 15 and new 29 vrl is the same, skip!!1

[SEC]copy_vrl_to_newaddr: old 18 and new 30 vrl is the same, skip!!1

[SEC]copy_vrl_to_newaddr: old 10 and new 31 vrl is the same, skip!!1

[SEC]copy_vrl_to_newaddr: old 12 and new 32 vrl is the same, skip!!1

[SEC]copy_vrl_to_newaddr: old 20 and new 25 vrl is the same, skip!!1

load fastboot2 succ and run it now!

fastboot is arm64 mode

[1970:1:1 16:43:25][31965]**************************

[1970:1:1 16:43:25][31983]

[log_addr begin: 0x07300fcb]

[1970:1:1 16:43:25][32002]******fastboot start******

[1970:1:1 16:43:25][32024]**************************

[1970:1:1 16:43:25][32043]Build Data: Jan  4 2018, 18:36:07



[1970:1:1 16:43:25][32067]ITLinesNumber is 0x00000005

[1970:1:1 16:43:25][32087]syscounter already init ok!

[1970:1:1 16:43:25][32106]start module sort

[1970:1:1 16:43:25][32179]start module dispatch

[1970:1:1 16:43:25][32197]ocp_info_str:!

[1970:1:1 16:43:25][32216]Efuse Preload successfully!

[1970:1:1 16:43:25][32235]eMMC controller type is 1

[1970:1:1 16:43:25][32254]eMMC host init OK!

[1970:1:1 16:43:25][32270]Start to init emmc card.

[1970:1:1 16:43:25][32289]eMMC:use IDMA

[1970:1:1 16:43:25][32801]emun eMMC success!

[1970:1:1 16:43:25][32819][ptn_init]: current_ptn = tn

[1970:1:1 16:43:25][33470][BDID]boardid: 719.

[1970:1:1 16:43:25][33486][BDID]CHIP_ID:0x48696220.

[1970:1:1 16:43:25][33506][BDID]pmu_id:0x00000011.

[1970:1:1 16:43:25][33693]-- usb_init -- start!

[1970:1:1 16:43:25][33711]update_serial: get_sn_str success!

[1970:1:1 16:43:25][34257]-- usb_init -- done!

[1970:1:1 16:43:25][34369]fdt_init success!

[1970:1:1 16:43:25][34647][display]: product_id = 64(0x00: CherryPlus, 0x10:Shine, 0x20:Alice).

[1970:1:1 16:43:25][34683]First Cold Start

[1970:1:1 16:43:25][34697]Set Warm Start Flag End

[1970:1:1 16:43:25][34717][fastboot]: dump_mode: 0

[1970:1:1 16:43:25][34736]reboot_type: 0

[1970:1:1 16:43:25][34750]smpl type is hi6553

[1970:1:1 16:43:25][34767]charger type is hi6521

[1970:1:1 16:43:25][34785]coulometer type is hi6553

[1970:1:1 16:43:25][34820]-----battery_board_type=0x00000002 

[1970:1:1 16:43:25][34856]-----battery_is_removable=0x00000000 

[1970:1:1 16:43:25][35078]-----battery_is_pcb=26000 

[1970:1:1 16:43:25][35297]-----battery_current_offset_a=1000000 

[1970:1:1 16:43:25][36781][clear_bootloader_mem]set_bootloader_mem ok!

[1970:1:1 16:43:25][36807]baatery init

[1970:1:1 16:43:25][36821][fastboot]: HKADC_IN2 = 7.

[1970:1:1 16:43:25][36840][fastboot]: boardid = 719.

[1970:1:1 16:43:25][36877]get oeminfo 18, len 32

[1970:1:1 16:43:25][37884]timer_cb

[1970:1:1 16:43:25][40065]oeminfo read 0000ad01, remian 1 blocks

[1970:1:1 16:43:25][40088]success to get vendor_name = dtdualsim,pl

[1970:1:1 16:43:25][40132]success to get vendor_id = 0x0000007f

[1970:1:1 16:43:25][40155]There is customization, the productid is 0x3db5457f

[1970:1:1 16:43:25][40186]mntn_dump_mem:can not get loadm3_ops!

[1970:1:1 16:43:25][40214]enter thermal_init

[1970:1:1 16:43:25][40230]after thermal_ddrarea_init

[1970:1:1 16:43:25][40249]GET DDR capacity. g_ddr_last_addr=0x7fffffff !!

[1970:1:1 16:43:25][40309]-----find hisi,hi6xxx-smmu node 

[1970:1:1 16:43:25][40344]-----find hisi_ion_iommu@0 node 

[1970:1:1 16:43:25][40369]-----fb_base=0x3e700000, fb_size=0x01900000 

[1970:1:1 16:43:25][40395][usb]get_otg_switch_oeminfo is enter! 

[1970:1:1 16:43:25][40418]get oeminfo 85, len 32

[1970:1:1 16:43:25][41097]timer_cb

[1970:1:1 16:43:25][43631]oeminfo read 0000ad61, remian 1 blocks

[1970:1:1 16:43:25][43657]secureboot: build time is Jan  4 2018:18:36:06

[1970:1:1 16:43:25][43684]hisi_secboot_check_baseptn: ok!

[1970:1:1 16:43:25][43918]fastboot: SecBoot_GetImgGrpID

[1970:1:1 16:43:25][43939]fastboot: SecBoot_GetImgGrpID

[1970:1:1 16:43:25][44024]SecBoot_ReadVRL: get ptn offset error!

[1970:1:1 16:43:25][44048]fastboot: SecBoot_GetImgGrpID

[1970:1:1 16:43:25][44069]fastboot: SecBoot_GetImgGrpID

[1970:1:1 16:43:25][44185]hisi_secboot_update_fbversion: ok!

[1970:1:1 16:43:25][44737]keypad_config_init: gpio_volume_up: 24, gpio_volume_down: 21

[1970:1:1 16:43:25][44769]init kernel_addr_sd:205520896 

[1970:1:1 16:43:25][44790][display]: get current lcd_id: 69

[1970:1:1 16:43:25][44811][display]: current lcd_id is 0x00000045

[1970:1:1 16:43:25][46466][display]: mipi_boe_nt35521_5P0_panel_probe_3lane exit succ

[1970:1:1 16:43:25][46498]portland platform

[1970:1:1 16:43:25][46514]LPNV:Valid0;Lpall1;Aslp1;Bldfs1;Bdfs1;Adfs1;Idle1;Ddfs1;

[1970:1:1 16:43:25][46544]lpctrl Valid:0

[1970:1:1 16:43:25][46558]lpnv_ap_feature_handler lpnv valid:0

[1970:1:1 16:43:25][46582]lpctrl_nvme_init

[1970:1:1 16:43:25][46599][fastboot]: fastboot_get_workmode, line:141 : work on normal mode

[1970:1:1 16:43:25][46646][fastboot]: preboot_init, line:1512 : current chip id is 0x48696220

[1970:1:1 16:43:25][46680][fastboot]: set_poweroff_charging_flag, line:155 : set_poweroff_charging_flag is 0

[1970:1:1 16:43:25][46720][fastboot]: set_update_mode_flag, line:168 : set_update_mode_flag is 0

[1970:1:1 16:43:25][46755][fastboot]: set_boot_reason_flag, line:186 : set_boot_reason_flag is 21,this is means : ColdReset 

[1970:1:1 16:43:25][46802] 



-----mode:check_boot_mode: in preboot -------

[1970:1:1 16:43:25][46830][fastboot]: check_boot_mode, line:1005 : this no usbdownload , go on next mode!

[1970:1:1 16:43:25][46869] 



-----mode:check_image_state: in preboot -------

[1970:1:1 16:43:25][46899][fastboot]: check_image_state, line:1052 :images are ready , go on next mode!

[1970:1:1 16:43:25][46937] 



-----mode:check_power_state: in preboot -------

[1970:1:1 16:43:25][46979][fastboot]: check_charger_port_status, line:313 :usb NOT connect pc!

[1970:1:1 16:43:25][47017][fastboot]: check_power_state, line:1066 : volumn key is 0,and DOWNSTREAM_PORT is 0! 

[1970:1:1 16:43:25][47062][smartstar]do a dummy read, smartstar version is 0x00000011

[1970:1:1 16:43:25][47093][smartstar]curexception, offset_cur_modify_val:0x00000000, before clear, before calib.

[1970:1:1 16:43:25][47136][smartstar]use nv calibration params 

[1970:1:1 16:43:25][47158][smartstar]v_offset_a:997, v_offset_b:13, r_pcb:26000, c_offset_a:1000, c_offset_b:0

[1970:1:1 16:43:25][47213][smartstar]plugout_shutdown:0, new_battery:0, charger_state:0, shutdown_time:20

[1970:1:1 16:43:25][47253][smartstar]saved ocv reg invalid:0x0000cdef

[1970:1:1 16:43:25][47277][smartstar]use_saved_ocv, saved ocv is invalid!!!

[1970:1:1 16:43:25][47306][smartstar]SMARTSTAR_OCV_VOLTAGE_BASE=17081, SMARTSTAR_OFFSET_VOLTAGE=-466 

[1970:1:1 16:43:25][47344][smartstar]SMARTSTAR_OCV_CURRENT_BASE=-477, SMARTSTAR_OFFSET_CURRENT=-614 

[1970:1:1 16:43:25][47381][smartstar]OCV before adjust=3951, adjust cur=64

[1970:1:1 16:43:25][47420][smartstar]OCV after adjust=3959

[1970:1:1 16:43:25][47441][smartstar]regval to write: [ 0x000044a9 ]

[1970:1:1 16:43:25][47484][smartstar]save_pmu_ocv, batt_temp:26, ocv_temp:260, batt_id:225

[1970:1:1 16:43:25][47517][smartstar]saved ocv reg=0xffffcdef, converted ocv=-1mv

[1970:1:1 16:43:25][47547][smartstar]cl_in_time=0, cl_out_time=0

[1970:1:1 16:43:25][47571][smartstar]cc_in_reg=0, cc_out_reg=0

[1970:1:1 16:43:25][47594][smartstar]after dma_memcpy, hkadc_batt_temp:26, hkadc_batt_id_voltage:225!

[1970:1:1 16:43:25][47647][get_device_power_state]:power_on_normal

[1970:1:1 16:43:25][47670][fastboot]: check_power_state, line:1076 : power state is 0x00000008! 

[1970:1:1 16:43:25][47706] 



-----mode:check_smpl_state: in preboot -------

[1970:1:1 16:43:25][47735][fastboot]: check_smpl_state, line:210 :SMPL didn't happen, go to next mode!

[1970:1:1 16:43:25][47773] 



-----mode:check_powerkey_misc_info: in preboot -------

[1970:1:1 16:43:25][47806][fastboot]: check_powerkey_misc_info, line:1178 :NO misc value , go to next mode!

[1970:1:1 16:43:25][47845] 



-----mode:check_volumekey_state: in preboot -------

[1970:1:1 16:43:25][47878][fastboot]: check_volumekey_state, line:1118 :checkimg volumn key process....

[1970:1:1 16:43:25][47916][fastboot]: check_volumekey_state, line:1119 :volumn key value is 0x00000000. 

[1970:1:1 16:43:25][47954][fastboot]: check_volumekey_state, line:1129 :unknow key pressed.

[1970:1:1 16:43:25][47987] 



-----mode:check_misc_info: in preboot -------

[1970:1:1 16:43:25][48026][fastboot]: comm_read_misc_cmd, line:486 :[fastboot]: the misc.command is .

[1970:1:1 16:43:25][48063][fastboot]: check_misc_info, line:1136 :get misc value is 0x0000000b 

[1970:1:1 16:43:25][48098][fastboot]: check_misc_info, line:1151 :NO misc value , go to next mode!

[1970:1:1 16:43:25][48135] 



-----mode:check_poweronkey_state: in preboot -------

[1970:1:1 16:43:25][48167][fastboot]: irq2_reg_value=68.

[1970:1:1 16:43:25][48187][fastboot]: power on key pressed goto normal mode! 

[1970:1:1 16:43:25][48216][fastboot]: check_poweronkey_state, line:1192 : power on key value is 2! 

[1970:1:1 16:43:25][48253][fastboot]: check_poweronkey_state, line:1196 : power on key pressed goto normal mode! 

[1970:1:1 16:43:25][48295][fastboot]: set_boot_reason_flag, line:186 : set_boot_reason_flag is 5,this is means : press1s 

[1970:1:1 16:43:25][48340][fastboot]: preboot_init, line:1551 : check_poweronkey_state: return boot type is 0

[1970:1:1 16:43:25][48380][fastboot]: get_poweroff_charging_flag, line:160 : get_poweroff_charging_flag is 0

[1970:1:1 16:43:25][50717][display]: hisi_display_logo enter!

[1970:1:1 16:43:25][50740][display]: the logo buffer base is 0x3ee08000

[1970:1:1 16:43:26][59451][logo]: this is new logo!.

[1970:1:1 16:43:26][59470][logo]: start: 26, len: 1843280, offset: 0.

[1970:1:1 16:43:26][59496][display]: ADE core_clk and pixel_clk reg_val = 0x8f830000

[1970:1:1 16:43:26][59527][display]: media_clkcfg0_noc reg_val = 0x00000084

[1970:1:1 16:43:26][59555][display]: InitLcd_on pinfo->lcd_init_step=(null)!

[1970:1:1 16:43:26][59774][display]: InitLcd_on pinfo->lcd_init_step=!

[1970:1:1 16:43:26][59800][display]: mipi_panel_on enter

[1970:1:1 16:43:26][71781][display]: mipi_panel_on exit

[1970:1:1 16:43:26][71801][display]: display_on succ!

[1970:1:1 16:43:26][75099][display]: mipi_panel_set_backlight level = 166

[1970:1:1 16:43:26][75126][display]: hisi_display_logo exit!

[1970:1:1 16:43:26][75150]get oeminfo 97, len 16

[1970:1:1 16:43:26][78418]oeminfo read 0000ae01, remian 1 blocks

[1970:1:1 16:43:26][78448]get oeminfo 35, len 12

[1970:1:1 16:43:26][81591]oeminfo read 0000ac61, remian 1 blocks

[1970:1:1 16:43:26][81614]get oeminfo 94, len 4

[1970:1:1 16:43:27][88750]cannot find oeminfo index 94

[1970:1:1 16:43:27][88769]frp get oeminfo fail

[1970:1:1 16:43:27][88786]hwdog_certify.lock_state.fb_lock_stat = 0

[1970:1:1 16:43:27][88811]hwdog_certify.lock_state.user_lock_stat = 1

[1970:1:1 16:43:27][88837]hwdog_certify.lock_state.check_root_stat = 1

[1970:1:1 16:43:27][88863]hwdog_certify.lock_state.check_sign_stat = 0

[1970:1:1 16:43:27][88890]widevine state already is unlocked

[1970:1:1 16:43:27][88922]hifi nv old status:0x05a0005c is 0x00040810

[1970:1:1 16:43:27][88948]load_hifi systable->bootmode is 1

[1970:1:1 16:43:27][88976]hifi: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][88995]hifi: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][89013]hifi: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][89048]hifi: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][89066]hifi: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][89085]hifi: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][90666]hifi: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][90685]hifi: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][90703]hifi: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][90723]SecBoot_PowerupVerification: ok!

[1970:1:1 16:43:27][90745]hisi_secboot_bootup_verification: ok!

[1970:1:1 16:43:27][90768]image_verification: secure hifi verification OK!

[1970:1:1 16:43:27][90805]the address of img_head is 0x3046b040

[1970:1:1 16:43:27][90828]img_head->image_size = 0x00277b28, while length = 0x00c00000

[1970:1:1 16:43:27][90860]img_head->sections_num = 0x00000017, while HIFI_SEC_MAX_NUM = 0x00000020

[1970:1:1 16:43:27][91904]sections_num = 23, image_size = 2587432.

[1970:1:1 16:43:27][91961]fastboot drv_hifi_fill_nv_info:phy addr = 06033000.

[1970:1:1 16:43:27][91988]hifi unload sections.

[1970:1:1 16:43:27][92154]dsp: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][92171]dsp: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][92207]dsp: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][92224]dsp: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][93629]dsp: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][93647]dsp: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][93665]SecBoot_PowerupVerification: ok!

[1970:1:1 16:43:27][93687]hisi_secboot_bootup_verification: ok!

[1970:1:1 16:43:27][93710]load_dsp: secure dsp verification OK!

[1970:1:1 16:43:27][94893]load_m3 systable->bootmode is 1

[1970:1:1 16:43:27][94917]mcuimage: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][94937]mcuimage: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][94957]mcuimage: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][94978]mcuimage: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][95010]mcuimage: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][95031]mcuimage: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][95051]mcuimage: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][95071]mcuimage: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][95409]mcuimage: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][95429]mcuimage: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][95450]mcuimage: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][95470]mcuimage: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][95490]SecBoot_PowerupVerification: ok!

[1970:1:1 16:43:27][95512]hisi_secboot_bootup_verification: ok!

[1970:1:1 16:43:27][95535]load_m3: secure mcuimage verification OK!

[1970:1:1 16:43:27][95654]begin to sd_init 

[1970:1:1 16:43:27][95673]begin to sd_init 

[1970:1:1 16:43:27][95688][fastboot]: sd_init begin 

[1970:1:1 16:43:27][95708]failed to regulator disable,enable_cnt error

[1970:1:1 16:43:27][96062]failed to regulator disable,enable_cnt error

[1970:1:1 16:43:27][96745]mmc_init:mshci_hardward_init OK

[1970:1:1 16:43:27][96929]mmc_init:mmc_controller_init OK

[1970:1:1 16:43:27][99784][CSD2.0] sd card size is:122240 MB

[1970:1:1 16:43:27][99857]It's 3.0 SD card.

[1970:1:1 16:43:27][100364]mmc_init:mmc_set_card_ready OK

[1970:1:1 16:43:27][100384][fastboot]: sd_init over 

[1970:1:1 16:43:27][100404]begin to fat_init 

[1970:1:1 16:43:27][100464] ------startmark------- 0 

[1970:1:1 16:43:27][100483] ------startdiskheander------- 10 

[1970:1:1 16:43:27][100506] ------startsector------- 9 

[1970:1:1 16:43:27][100527] ------startcylinder------- 2 

[1970:1:1 16:43:27][100549] ------systemmark------- 7 

[1970:1:1 16:43:27][100570] ------enddiskheander------- 254 

[1970:1:1 16:43:27][100592] ------endsector------- 63 

[1970:1:1 16:43:27][100613] ------endcylinder------- 1087 

[1970:1:1 16:43:27][100635] ------sectorbefore------- 32768 

[1970:1:1 16:43:27][100657] ------sectorcount------- 250314752 

[1970:1:1 16:43:27][100698] gl_Fat_Start_Sector 32768 

[1970:1:1 16:43:27][100717]_______SDLoad_determine_fat_type____FAT12_____[1970:1:1 16:43:27][100744]

[1970:1:1 16:43:27][100753]------SDLoad_FS_Init:FS Type Error------[1970:1:1 16:43:27][100778]

[1970:1:1 16:43:27][100788]fat_fs_init failed

[1970:1:1 16:43:27][100806]module --- oba_log init fail, return -1!

[1970:1:1 16:43:27][100832]bootmode is 1!

[1970:1:1 16:43:27][100847]normal mode!

[1970:1:1 16:43:27][100868]normalboot_init hifi started

[1970:1:1 16:43:27][100929]trustfirmware: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][100953]trustfirmware: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][100976]trustfirmware: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][101001]trustfirmware: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][101037]trustfirmware: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][101061]trustfirmware: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][101084]trustfirmware: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][101106]trustfirmware: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][101401]trustfirmware: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][101425]trustfirmware: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][101448]trustfirmware: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][101470]trustfirmware: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][101492]SecBoot_PowerupVerification: ok!

[1970:1:1 16:43:27][101517]start load teeos image

[1970:1:1 16:43:27][101918]teeos: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][101938]teeos: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][101958]teeos: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][101991]teeos: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][102011]teeos: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][102031]teeos: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][102783]teeos: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][102803]teeos: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][102822]teeos: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][102842]SecBoot_PowerupVerification: ok!

[1970:1:1 16:43:27][102919]teeos load addr is 3d600000

[1970:1:1 16:43:27][102943]boot: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][102962]boot: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][102997]boot: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][103018]boot: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][115167]SecBoot_ImageVerification: SEB_FlashImageVerification error(0xf1000009)!

[1970:1:1 16:43:27][115204]SecBoot_PowerupVerification: SecBoot_ImageVerification error(0xf1000009)!

[1970:1:1 16:43:27][115241]hisi_secboot_bootup_verification: SecBoot_PowerupVerification error(prim vrl )!

[1970:1:1 16:43:27][115282]boot: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][115301]boot: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][115335]boot: SecBoot_GetImgGrpID

[1970:1:1 16:43:27][115355]boot: SecBoot_GetImgGrpID

[1970:1:1 16:43:28][127501]SecBoot_ImageVerification: SEB_FlashImageVerification error(0xf1000009)!

[1970:1:1 16:43:28][127538]SecBoot_PowerupVerification: SecBoot_ImageVerification error(0xf1000009)!

[1970:1:1 16:43:28][127576]hisi_secboot_bootup_verification: SecBoot_PowerupVerification error(back vrl)!

[1970:1:1 16:43:28][127616]img_head :309896c0

[1970:1:1 16:43:28][127639]

kernel @ 0x07480000 (0x012c4598 bytes), read from emmc boot @ 0x00000800

[1970:1:1 16:43:28][135289]ramdisk @ 0x0f000000 (0x003d2fb2 bytes), read from emmc boot @ 0x012c5000

[1970:1:1 16:43:28][136889]sec_pre_cfg_func 

[1970:1:1 16:43:28][136947]execute_load_modem_async systable->bootmode is 1

[1970:1:1 16:43:28][136991]execute_load_modem_async: secvrl read success!

[1970:1:1 16:43:28][137715]prepare_modem:297 .

[1970:1:1 16:43:28][137732]loadaddr 0x00004000 prepare_modem:309 .

[1970:1:1 16:43:28][137758]get_sys_freq find config failed !!

[1970:1:1 16:43:28][137780]fastboot2 get_sys_freq: failed !! 

[1970:1:1 16:43:28][137803]prepare_modem:313 .

[1970:1:1 16:43:28][137820]set_ccpu_freq: 720 HMz, ccpu_lbus_freq: 360 MHz !! 

[1970:1:1 16:43:28][137849]prepare_modem:318 .

[1970:1:1 16:43:28][137866]prepare_modem:325 .

[1970:1:1 16:43:28][137883]prepare_modem:335 .

[1970:1:1 16:43:28][137902]hdr->cmdline = 'hisi_dma_print=0 vmalloc=384M maxcpus=8 coherent_pool=512K no_irq_affinity androidboot.selinux=enforcing ate_enable=true'

[1970:1:1 16:43:28][137966]boot_kernel: can not get audio_codec_ops!

[1970:1:1 16:43:28][138004]cmd_line_mem_size = 0x80000000

[1970:1:1 16:43:28][138031]create_kernelsize_cmdline : cmd_line_mem_size = 0x0000078cMB

[1970:1:1 16:43:28][138080][fastboot]: get_poweroff_charging_flag, line:160 : get_poweroff_charging_flag is 0

[1970:1:1 16:43:28][138185]cmdline of usb_otg_status is  .

[1970:1:1 16:43:28][138214]can not get obalog_ops!

[1970:1:1 16:43:28][138238][fastboot]: get_boot_reason_flag, line:216 : get_boot_reason_flag is 5

[1970:1:1 16:43:28][138274][reset_type]:get reboot type flag is 5.

[1970:1:1 16:43:28][138323]mem dump nve not open 

[1970:1:1 16:43:28][138398]get_loglevel: fdt addr is 0x30368820,offset = 0

[1970:1:1 16:43:28][138704]get_loglevel: offset of "hisilicon,fastboot" is 17012

[1970:1:1 16:43:28][138736]get_loglevel: loglevel=0x00000005 

[1970:1:1 16:43:28][138769]cmdline of bitmap abnormal reset is bitmapofabnrst=0x00000008

[1970:1:1 16:43:28][138821]ddr_info: []

[1970:1:1 16:43:28][138835]cmdline of boot_slice is boot_slice=0x00021e51

[1970:1:1 16:43:28][140410]create_console_cmdline: cmdline is no_uart_console 

[1970:1:1 16:43:28][140445]get_cmdlind_from_nve nv is INVALID 

[1970:1:1 16:43:28][140468]creat_flash_nv_cmdline error

[1970:1:1 16:43:28][140488]create_mdmlog_cmdline: base=0x00000000 size=0x00000000, time=0x00000000

[1970:1:1 16:43:28][140547][fastboot]: get_boot_reason_flag, line:216 : get_boot_reason_flag is 5

[1970:1:1 16:43:28][140624]boot_kernel: can not get uart_cfg_ops!

[1970:1:1 16:43:28][140673]Cmdline: hisi_dma_print=0 vmalloc=384M maxcpus=8 coherent_pool=512K no_irq_affinity androidboot.selinux=enforcing ate_enable=true iommu_ddr_size=0x80000000 mem=1932M boardid=0x48696220,0x00000011,0x000002cf productid=0x3db5457f androidboot.mode=normal pmu_nv_addr=0x070c79b0 low_volt_flag=0 iommu_enable boottype=pknormal enter_recovery=0 androidboot.swtype=normal fastboot_version=DailyBuild_201801041828_FASTBOOT androidboot.serialno=[REDACTED] rescue_version=  otg.status=disable normal_reset_type=press1s himntn=00011100000000000000000000001000 LCD_TYPE=TM_NT35521_LCD density=320 setup_logctl=0 loglevel=5 bitmapofabnrst=0x00000008  boot_slice=0x00021e51 no_uart_console mdmlogbase=0x00000000 mdmlogsize=0x00000000 mdmlogtime=0x00000000 async_loadmodem efuse_status=0 recovery_update=0 fblock=unlocked userlock=unlocked androidboot.hardware=hi6210sft 

[1970:1:1 16:43:28][141021]add_device_tree: can not get memory_cfg_ops!

[1970:1:1 16:43:28][141050]add_device_tree: can not get uart_cfg_ops!

[1970:1:1 16:43:28][141393]sec_post_cfg_func 

[1970:1:1 16:43:28][141409]interrupts: 160

[1970:1:1 16:43:28][141425]GIC address:f6801080, value:fe00ffff -> fe00ffff 

[1970:1:1 16:43:28][141454]GIC address:f6801084, value:ffffffff -> ffffffff 

[1970:1:1 16:43:28][141483]GIC address:f6801088, value:ffffffff -> ffffffff 

[1970:1:1 16:43:28][141511]GIC address:f680108c, value:ffffffff -> ffffffff 

[1970:1:1 16:43:28][141539]GIC address:f6801090, value:ffffffff -> ffffffff 

[1970:1:1 16:43:28][141567]  primask 000000f8

[1970:1:1 16:43:28][141584]DMA address:f7370860 value: 00000000 -> 00040040

[1970:1:1 16:43:28][141613]DMA address:f73708a0 value: 00002002 -> 00040040

[1970:1:1 16:43:28][141641]DMA address:f73708e0 value: 00000000 -> 00040040

[1970:1:1 16:43:28][141669]DMA address:f7370920 value: 00000000 -> 00040040

[1970:1:1 16:43:28][141697]DMA address:f7370960 value: 00000000 -> 00040040

[1970:1:1 16:43:28][141725]DMA address:f73709a0 value: 00000000 -> 00040040

[1970:1:1 16:43:28][141753]DMA address:f73709e0 value: 00000000 -> 00040040

[1970:1:1 16:43:28][141781]DMA address:f7370a20 value: 00000000 -> 00040040

[1970:1:1 16:43:28][141809]DMA address:f7370a60 value: 00000000 -> 00040040

[1970:1:1 16:43:28][141837]DMA address:f7370aa0 value: 00000000 -> 00040040

[1970:1:1 16:43:28][141865]DMA address:f7370ae0 value: 00000000 -> 00040040

[1970:1:1 16:43:28][141893]DMA address:f7370b20 value: 00000000 -> 00040040

[1970:1:1 16:43:28][141921]DMA address:f7370b60 value: 00000000 -> 00040040

[1970:1:1 16:43:28][141949]DMA address:f7370ba0 value: 00000000 -> 00040040

[1970:1:1 16:43:28][141977]DMA address:f7370be0 value: 00000000 -> 00040040

[1970:1:1 16:43:28][142010]=======================================================

[1970:1:1 16:43:28][142040]The configure of sec 0:

[1970:1:1 16:43:28][142057]=======================================================

[1970:1:1 16:43:28][142089]=======================================================

[1970:1:1 16:43:28][142118]The configure of sec 1:

[1970:1:1 16:43:28][142137][Sec 1 Region 0]: [1970:1:1 16:43:28][142152]Map = 0x00000000; [1970:1:1 16:43:28][142168]Attrib = 0x0000000f; [1970:1:1 16:43:28][142186]MID_WR = 0xffffffff; [1970:1:1 16:43:28][142203]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][142221][Sec 1 Region 1]: [1970:1:1 16:43:28][142236]Map = 0x97000000; [1970:1:1 16:43:28][142252]Attrib = 0x00000000; [1970:1:1 16:43:28][142269]MID_WR = 0xffffffff; [1970:1:1 16:43:28][142286]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][142304][Sec 1 Region 2]: [1970:1:1 16:43:28][142320]Map = 0x94000100; [1970:1:1 16:43:28][142336]Attrib = 0x00000000; [1970:1:1 16:43:28][142353]MID_WR = 0xffffffff; [1970:1:1 16:43:28][142369]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][142387][Sec 1 Region 3]: [1970:1:1 16:43:28][142403]Map = 0x93000730; [1970:1:1 16:43:28][142419]Attrib = 0x000f000c; [1970:1:1 16:43:28][142436]MID_WR = 0xffffffff; [1970:1:1 16:43:28][142453]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][142471][Sec 1 Region 4]: [1970:1:1 16:43:28][142487]Map = 0x97003c00; [1970:1:1 16:43:28][142503]Attrib = 0x007f000c; [1970:1:1 16:43:28][142520]MID_WR = 0xffffffff; [1970:1:1 16:43:28][142537]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][142555][Sec 1 Region 5]: [1970:1:1 16:43:28][142571]Map = 0x97003d00; [1970:1:1 16:43:28][142586]Attrib = 0xff80000c; [1970:1:1 16:43:28][142603]MID_WR = 0xffffffff; [1970:1:1 16:43:28][142621]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][142638][Sec 1 Region 6]: [1970:1:1 16:43:28][142654]Map = 0x00000000; [1970:1:1 16:43:28][142670]Attrib = 0x00000000; [1970:1:1 16:43:28][142687]MID_WR = 0xffffffff; [1970:1:1 16:43:28][142704]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][142722][Sec 1 Region 7]: [1970:1:1 16:43:28][142738]Map = 0x00000000; [1970:1:1 16:43:28][142754]Attrib = 0x00000000; [1970:1:1 16:43:28][142771]MID_WR = 0xffffffff; [1970:1:1 16:43:28][142788]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][142805][Sec 1 Region 8]: [1970:1:1 16:43:28][142821]Map = 0x00000000; [1970:1:1 16:43:28][142837]Attrib = 0x00000000; [1970:1:1 16:43:28][142854]MID_WR = 0xffffffff; [1970:1:1 16:43:28][142871]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][142889][Sec 1 Region 9]: [1970:1:1 16:43:28][142905]Map = 0x00000000; [1970:1:1 16:43:28][142920]Attrib = 0x00000000; [1970:1:1 16:43:28][142938]MID_WR = 0xffffffff; [1970:1:1 16:43:28][142955]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][142973][Sec 1 Region 10]: [1970:1:1 16:43:28][142989]Map = 0x00000000; [1970:1:1 16:43:28][143004]Attrib = 0x00000000; [1970:1:1 16:43:28][143022]MID_WR = 0xffffffff; [1970:1:1 16:43:28][143039]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][143057][Sec 1 Region 11]: [1970:1:1 16:43:28][143073]Map = 0x00000000; [1970:1:1 16:43:28][143088]Attrib = 0x00000000; [1970:1:1 16:43:28][143106]MID_WR = 0xffffffff; [1970:1:1 16:43:28][143123]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][143141][Sec 1 Region 12]: [1970:1:1 16:43:28][143157]Map = 0x00000000; [1970:1:1 16:43:28][143172]Attrib = 0x00000000; [1970:1:1 16:43:28][143190]MID_WR = 0xffffffff; [1970:1:1 16:43:28][143207]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][143224][Sec 1 Region 13]: [1970:1:1 16:43:28][143241]Map = 0x00000000; [1970:1:1 16:43:28][143256]Attrib = 0x00000000; [1970:1:1 16:43:28][143274]MID_WR = 0xffffffff; [1970:1:1 16:43:28][143291]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][143308][Sec 1 Region 14]: [1970:1:1 16:43:28][143325]Map = 0x00000000; [1970:1:1 16:43:28][143340]Attrib = 0x00000000; [1970:1:1 16:43:28][143357]MID_WR = 0xffffffff; [1970:1:1 16:43:28][143375]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][143392][Sec 1 Region 15]: [1970:1:1 16:43:28][143409]Map = 0x00000000; [1970:1:1 16:43:28][143424]Attrib = 0x00000000; [1970:1:1 16:43:28][143441]MID_WR = 0xffffffff; [1970:1:1 16:43:28][143458]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][143476]=======================================================

[1970:1:1 16:43:28][143507]=======================================================

[1970:1:1 16:43:28][143538]The configure of sec 2:

[1970:1:1 16:43:28][143556][Sec 2 Region 0]: [1970:1:1 16:43:28][143572]Map = 0x00000000; [1970:1:1 16:43:28][143588]Attrib = 0x0000000f; [1970:1:1 16:43:28][143605]MID_WR = 0xffffffff; [1970:1:1 16:43:28][143622]MID_RD = 0xffffffff;

[1970:1:1 16:43:28][143640][Sec 2 Region 1]: [1970:1:1 16:43:28][143656]Map = 0x97000000; [1970:1:1 16:43:28][143671]\00Attrib = 0x00000000; [1970:1:1 16:43:28][143689]MID_WR = 0xfff\00fffff; [1970:1:1 16:43:28][143706]MID_RD = 0xffffffff;

[1970\00:1:1 16:43:28][143724][Sec 2 Region 2]: [1970:1:1 16:43:28][14\003739]Map = 0x94000100; [1970:1:1 16:43:28][143755]Attrib = 0x0\000000000;\00
(back to 115200?)
core addr:0x0xfff80e20, phy:0x0xfff80e20
BL31 Built : 18:33:20, Jan  4 2018

Installation

Flashing rootfs may not work, use sideload.

Mainline status and components

It may be possible to mainline this device, as its SoC is supported in the mainline kernel.

Element type Element Works? Notes
Chipset HiSilicon Kirin 620 (Hi6220) DTS in mainline
Graphics Mali-450MP4 Seems to have a node in the DTS?
Charger HI6521/BQ2419X BQ24190 is supported in mainline
PMIC HI6552 Appears to be supported in mainline
Touchscreen CYTTSP5 Supported in mainline.
USB switch FSA9685 Not supported in mainline
NFC NXP PN547 Supported in mainline
Audio codec MAX98925, TFA9895 Supported in mainline
WiFi, Bluetooth BCM4343/HI1101
Accelerometer ST_LIS3XH/ROHM_KX023 Both supported in mainline (first one not exactly, but should be the same as other ST accelerometers in mainline). Second one is confirmed to be used.
Proximity/light sensor TAOS_TMD27723 Variant of the TMD2772 which is supported in mainline
Compass/magnetic AKM09911 Not supported in mainline
Hall effect sensor AK8789 Not supported in mainline
Primary camera OV13850 Mainline has support for an OV13858
Secondary camera OV5648 (foxconn) Supported in mainline
Display BOE NT35521 Mainline has a driver for a similar panel in a Sony device

There are many cameras (OV5648, IMX134, S5K4E1GA, OV13850, IMX328, OV8856, IMX219, HI843S) and displays (OTM1902B, OTM1282B, NT35521, LPM070W425C) listed in the defconfig; these were present on my device.

Getting the camera/display used on your device

$ cat /sys/k3_camera/pri_sensor && echo ""
$ cat /sys/k3_camera/sec_sensor && echo ""
$ cat /sys/class/graphics/fb0/lcd_model

Gallery

See also